package cn.exrick.xboot.file

import cn.exrick.xboot.core.common.vo.Result
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import org.springframework.web.multipart.MultipartFile

@RestController
@RequestMapping("/xboot/file")
@Api(tags = ["上传文件接口"])
open class FileController {


    @Autowired
    private lateinit var iFileService: IFileService

    @ApiOperation("上传文件")
    @PostMapping("/uploadFile")
    fun uploadFile(file: MultipartFile): Result<String?>? {

        return iFileService.uploadFile(file)
    }
}